//
//  ParayerTimesManager.h
//  prayertimes
//
//  Created by Serge Zalozniy on 6/9/13.
//  Copyright (c) 2013 Serge Zalozniy. All rights reserved.
//

#import <CoreLocation/CoreLocation.h>
#import "MDSuperDataSource.h"
#import "PrayerTimeTable.h"
#import "DataProvider.h"

#define NOTIFICATION_TITLE_KEY @"notificationTitle"
#define NOTIFICATION_DATE_KEY @"notificationDate"

typedef enum {
	RequestTypePrayers = 1,
	RequestTypePrayersNextMonth = 2,
	RequestTypeGold = 3,
	RequestTypeGeocoding = 4,
	
} RequestType;

static NSString *const PrayerTimesManagerDidFinishTimeRequest = @"PrayerTimesManagerDidFinishTimeRequest";
static NSString *const PrayerTimesManagerDidSaveUserData = @"PrayerTimesManagerDidSaveUserData";

@interface PrayerTimesManager : MDSuperDataSource<MDSuperDataSourceDelegate> {
	DataProvider *dataProvider;
}

@property (nonatomic, retain) NSDictionary *userData;

+(PrayerTimesManager *) sharedInstance;

-(void) loadPrayerTimesWithYear:(NSInteger)year month:(NSInteger)month;
-(void) loadGoldPrice;
-(void) geocodeCounty:(NSString *)country city:(NSString *)city;
-(void) saveUserData;
-(void) cancelUserData;

-(NSArray *) getTimesForNotification;

-(void) checkTimeTableForNextMonth;
-(PrayerTime *) getPrayerTimeForToday;


@end
